<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/3/19
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title>没饿哦——打造全国顶尖外卖</title>
    <meta name="renderer" content="webkit">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

    <%--<meta name="baidu-site-verification" content="w6Fl7g6AOW" />--%>

    <link rel="shortcut icon" href="/images/user.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/user/car.css">
    <link rel="stylesheet" href="/css/user/footer.css">
    <link rel="stylesheet" href="/css/user/header.css">
    <script src="/layui/layui.js"></script>
    <script src="/js/user/common.js"></script>
    <script src="/js/user/car.js"></script>
    <script src="/js/jquery-3.3.1.min.js"></script>
</head>
<body>
<div id="usrid" hidden>${user.userId}</div>
<c:if test="${ sessionScope.user==null }">
    <div id="car_main">
        <h3>还未登陆，请先登陆哦~</h3>
    </div>
    <!-- 未登录时显示登录按钮 start-->
    <div id="car_but">
        <a href="/user/loginPage" target="_blank"><button class="layui-btn layui-btn-primary" id="car_but_login">点击登陆</button></a>
    </div>
    <!-- 未登录时显示登录按钮 end-->
</c:if>
<c:if test="${ sessionScope.user!=null }">
    <!-- 登录时显示table start-->
    <table id="productTable" lay-filter="productTable"></table>
    <div id="pay" style="margin-top: 40px; margin-left: 45%" >
        <a href="javascript:void(0);" onclick="pay()"><button class="layui-btn layui-btn-primary" id="car_button">已选择<label id="l1">0</label>元，点击支付</button></a>
    </div>
    <!-- 登录时显示table end-->

    <%--修改弹出层--%>
    <div style="display: none;padding: 20px" id="saveOrUpdateDiv">
        <form class="layui-form" lay-filter="dataFrm" id="dataFrm">
            <div>
                <label class="layui-form-label">购买数量:</label>
                <input type="hidden" name="orderId">
                <input  type="number" name="count" id="count" autocomplete="off" class="layui-input layui-input-inline"
                        placeholder="请输入购买数量" style="height: 28px;border-radius: 10px" lay-verify="required">
            </div>
            <div class="layui-form-item" style="margin-top: 40px">
                <div class="layui-input-block" style="text-align: center;padding-right: 120px">
                    <button type="button"
                            class="layui-btn layui-btn-normal layui-btn-md layui-icon layui-icon-release layui-btn-radius"
                            lay-filter="doSubmit" lay-submit="">提交
                    </button>
                    <button type="reset"
                            class="layui-btn layui-btn-warm layui-btn-md layui-icon layui-icon-refresh layui-btn-radius">重置
                    </button>
                </div>
            </div>
        </form>
    </div>
    <%--头部工具栏--%>
    <script id="toolbarProduct" type="text/html">
        <div class="layui-btn-container">
             <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="productDelChk">批量删除</button>
        </div>
    </script>
    <%--行工具栏--%>
    <script id="barProduct" type="text/html">
        <a class="layui-btn layui-btn-xs layui-btn-radius" lay-event="edit">修改数量</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs " lay-event="del">删除</a>
    </script>
</c:if>

</body>
</html>
